package com.ruoyi.supermarket.mapper;

import java.util.List;

import com.ruoyi.supermarket.annotation.AutoFill;
import com.ruoyi.supermarket.annotation.OperationType;
import com.ruoyi.supermarket.domain.Warehouse;

/**
 * 货位Mapper接口
 * 
 * @author ruoyi
 * @date 2024-05-19
 */
public interface WarehouseMapper 
{
    /**
     * 查询货位
     * 
     * @param whId 货位主键
     * @return 货位
     */
    public Warehouse selectWarehouseByWhId(Long whId);

    /**
     * 查询货位列表
     * 
     * @param warehouse 货位
     * @return 货位集合
     */
    public List<Warehouse> selectWarehouseList(Warehouse warehouse);

    /**
     * 新增货位
     * 
     * @param warehouse 货位
     * @return 结果
     */
    @AutoFill(OperationType.INSERT)
    public int insertWarehouse(Warehouse warehouse);

    /**
     * 修改货位
     * 
     * @param warehouse 货位
     * @return 结果
     */
    @AutoFill(OperationType.UPDATE)
    public int updateWarehouse(Warehouse warehouse);

    /**
     * 删除货位
     * 
     * @param whId 货位主键
     * @return 结果
     */
    public int deleteWarehouseByWhId(Long whId);

    /**
     * 批量删除货位
     * 
     * @param whIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWarehouseByWhIds(Long[] whIds);

    Warehouse selectWarehouseByWhName(String whName);
}
